package com.syy.homework1;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class HomeWorkGroup extends WritableComparator {
    protected HomeWorkGroup() {
        super(HomeWork.class, true);
    }
    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        HomeWork h1 = (HomeWork) a;
        HomeWork h2 = (HomeWork) b;
        return h1.getName().compareTo(h2.getName());
    }
}
